package com.o2o.model.user;


import java.util.Date;

import org.springframework.stereotype.Component;

import com.o2o.base.BaseModel;
import com.o2o.util.TimeUtil;

@Component
public class User extends BaseModel{

	/**
	 * 用户类
	 */
	private static final long serialVersionUID = -2093814737392674993L;
	
	private long id;
	
	private String name; //昵称
	
	private String passwd; //密码
	
	private String emailAccount; //登陆账户
	
	private int status;//账号状态
	
	private String userPicture;//用户头像
	
	private long time;
	
	
	/**
	 * 获取创建时间
	 * @return
	 */
	public Date getRegistTime(){
		return TimeUtil.GetDateTimeByStamp(this.time*1000);
	}


	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public String getUserPicture() {
		return userPicture;
	}

	public void setUserPicture(String userPicture) {
		this.userPicture = userPicture;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getPasswd() {
		return passwd;
	}

	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}



	public String getEmailAccount() {
		return emailAccount;
	}

	public void setEmailAccount(String emailAccount) {
		this.emailAccount = emailAccount;
	}



	@Override
	public String toString() {
		return "User [id=" + id + ", name=" + name + ", passwd=" + passwd
				+ ", emailAccount=" + emailAccount + ", status=" + status
				+ ", userPicture=" + userPicture + ", time=" + time + "]";
	}


	public User(long id, String name, String passwd, String emailAccount,
			int status, String userPicture, long time) {
		super();
		this.id = id;
		this.name = name;
		this.passwd = passwd;
		this.emailAccount = emailAccount;
		this.status = status;
		this.userPicture = userPicture;
		this.time = time;
	}


	public User() {
	}


	
	
	
	
	

}
